﻿using SIIE_ERP.Codigo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Elysium.Demo.PuntoVenta.Transacciones
{
    /// <summary>
    /// Lógica de interacción para UserControl_TA1.xaml
    /// </summary>
    public partial class UserControl_TA1 : UserControl
    {
        private UsuarioActivo _sesion;

        public UserControl_TA1(ref UsuarioActivo sesion)
        {
            InitializeComponent();
            this._sesion = sesion;
        }

        private void Button_Telcel_Click_1(object sender, RoutedEventArgs e)
        {
            Window window = new Window
            {
                Title = "Selección Monto",
                Height = 415,
                Width = 735,
                WindowStyle = System.Windows.WindowStyle.ToolWindow,
                ResizeMode = System.Windows.ResizeMode.NoResize,
                Content = new UserControl_TA2(ref _sesion, 1)
            };

            Window parentWindow = (Window)this.Parent;
            parentWindow.Close();

            window.ShowDialog();            
        }

        private void Button_Movistar_Click_1(object sender, RoutedEventArgs e)
        {
            Window window = new Window
            {
                Title = "Selección Monto",
                Height = 415,
                Width = 735,
                WindowStyle = System.Windows.WindowStyle.ToolWindow,
                ResizeMode = System.Windows.ResizeMode.NoResize,
                Content = new UserControl_TA2(ref _sesion, 2)
            };

            Window parentWindow = (Window)this.Parent;
            parentWindow.Close();

            window.ShowDialog();
        }

        private void Button_UNEFON_Click_1(object sender, RoutedEventArgs e)
        {
            Window window = new Window
            {
                Title = "Selección Monto",
                Height = 415,
                Width = 735,
                WindowStyle = System.Windows.WindowStyle.ToolWindow,
                ResizeMode = System.Windows.ResizeMode.NoResize,
                Content = new UserControl_TA2(ref _sesion, 3)
            };

            Window parentWindow = (Window)this.Parent;
            parentWindow.Close();

            window.ShowDialog();
        }

        private void Button_NEXTEL_Click_1(object sender, RoutedEventArgs e)
        {
            Window window = new Window
            {
                Title = "Selección Monto",
                Height = 415,
                Width = 735,
                WindowStyle = System.Windows.WindowStyle.ToolWindow,
                ResizeMode = System.Windows.ResizeMode.NoResize,
                Content = new UserControl_TA2(ref _sesion, 5)
            };

            Window parentWindow = (Window)this.Parent;
            parentWindow.Close();

            window.ShowDialog();
        }

        private void Button_IUSACELL_Click_1(object sender, RoutedEventArgs e)
        {
            Window window = new Window
            {
                Title = "Selección Monto",
                Height = 415,
                Width = 735,
                WindowStyle = System.Windows.WindowStyle.ToolWindow,
                ResizeMode = System.Windows.ResizeMode.NoResize,
                Content = new UserControl_TA2(ref _sesion, 4)
            };

            Window parentWindow = (Window)this.Parent;
            parentWindow.Close();

            window.ShowDialog();
        }
    }
}
